//搜索框
const txt = document.querySelector('.txt')
const ph = document.querySelector('.ph')

txt.addEventListener('click',function(){
    
    ph.style.display='none'
})
txt.addEventListener('blur',function(){
    txt.value= ''
    ph.style.display='block'
    const srch1 = document.querySelector('.m-srch1')
    srch1.style.display= 'none'
})
txt.addEventListener('input',function(){
    const txtval = txt.value.length
    console.log(txtval);
    if(txtval>0){
        const srch1 = document.querySelector('.m-srch1')
        srch1.style.display= 'block'
    }else{
        const srch1 = document.querySelector('.m-srch1')
        srch1.style.display= 'none'
    }
})